import React from 'react';
import ReactDOM from 'react-dom';
import {HashRouter, Switch, Route} from 'react-router-dom'

import 'antd-mobile/dist/antd-mobile.css';

import Rigister from './containers/register/register'
import Login from './containers/login/login'
import Main from './containers/main/main'

import * as serviceWorker from './serviceWorker';

ReactDOM.render((
    <HashRouter>
      <Switch>
        <Route path="/register" component={Rigister}/>
        <Route path="/login" component={Login}/>
        <Route component={Main}></Route>
      </Switch>
    </HashRouter>
), document.getElementById('root'))

// import React from 'react'
// import ReactDOM from 'react-dom'
// import {HashRouter, Switch, Route} from 'react-router-dom'
// import {Provider} from 'react-redux'

// import store from './redux/store'
// import Rigister from './containers/register/register'
// import Login from './containers/login/login'
// import Main from './containers/main/main'

// import './assets/css/index.less'

// // import './test/socketio_test'

// ReactDOM.render((
//   <Provider store={store}>
//     <HashRouter>
//       <Switch>
//         <Route path="/register" component={Rigister}/>
//         <Route path="/login" component={Login}/>
//         <Route component={Main}></Route> 默认路由
//       </Switch>
//     </HashRouter>
//   </Provider>
// ), document.getElementById('root'))

// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: https://bit.ly/CRA-PWA
serviceWorker.unregister();
